<h3 class="dialog_title"><span>History Jabatan</span></h3>
<div class="dialog_content" style="width: 700px">
<form id="hstJbtSearchFrm" action="<?php echo site_url(array('psdm','karyawan','ajax','historyJabatan_search')) ?>">
	<div style="border-bottom: 1px solid #CCC; padding: 10px;">
		<input type="hidden" name="offset" value="" /> 
		<input type="hidden" name="limit" value="10" />
		<input type="hidden" name="orderby" value="" />
		<input type="hidden" name="kary_id" value="<?php echo $kary_id?>" />
		<table>
			<tr valign="middle">
				<td width="50">Search :</td>
				<td><input type="text" name="key" value="" /></td>
			</tr>
		</table>
		<table id="hstJbtSearchFrm_table" class="zebraable" cellpadding="5" cellspacing="0" width="100%">
			<tr class="header">
				<td width="120px">Jabatan</td>
				<td width="120px">Departemen</td>
				<td>Tanggal Menjabat</td>
				<td>Tanggal Berhenti</td>
				<td>Status</td>
				<td></td>
			</tr>
			<tbody id="hstJbtSearchFrm_tableContent">
				<?php 
				$zebra=0;
				if ($data->num_rows() > 0):
					foreach($data->result_array() as $ch):
				?>
					<tr <?php if ($zebra++%2==1):?> class="zebra" <?php endif?>>
						<td><?php echo $ch['jbt_nama']?></td>
						<td><?php echo $ch['dep_nama']?></td>
						<td><?php echo date('d-m-Y', strtotime($ch['kary_jbt_tgl_menjabat']))?></td>
						<td><?php echo $ch['kary_jbt_tgl_berhenti']==NULL || 
										$ch['kary_jbt_tgl_berhenti']=='0000-00-00 00:00:00'? "":
										date('d-m-Y', strtotime($ch['kary_jbt_tgl_berhenti']))?></td>
						<td><?php
//							$stop = strtotime($ch['kary_jbt_tgl_berhenti']);
//							$now = time();
//							echo $now < $stop? "AKTIF" : "NON AKTIF";
							echo $ch['status']; 
						?></td>
					</tr>
				<?php 
					endforeach;
				else:
				?><tr><td align="center" colspan="4">Tidak ada data</td></tr><?php 
				endif;
				?>
			</tbody>
		</table>
		
		<div style="margin-top: 10px; margin-right: 6px" align="right">
			<div id="hstJbtSearchFrm_pagination" class="pagination" style="display: inline;"></div>
		</div>
	</div>
	<div class="dialog_buttons" style="padding: 12px 10px">
		<input class="button" type="button" value="Cancel" onclick="FBModal_hide()" />
	</div>
</form>
</div>